
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

	<div class="ibox ">
		<div class="ibox-title">
			<h4>关联职员和岗位</h4>
		</div>
		<div class="ibox-content border-bottom" style="padding-bottom: 0px;">
			<div class="table-responsive">
				<table class="table table-striped table-hover table-bordered border-top">
					<thead>
						<tr>
							<th></th>
							<th width="10%">序号</th>
							<th>职员</th>
							<th>岗位</th>
							<th>组织</th>
							<th>状态</th>
						</tr>
					</thead>
					<tbody id="userSelect">
						<c:forEach items="${requestScope.relateList}" var="data" varStatus="status">
							<tr>
								<td><input type="checkbox" class="i-checks" id="${data[1].staffCode}_${data[1].staffName}"></td>
								<td>${status.count}</td>
								<td>${data[1].staffName}</td>
								<td>${data[2].positionName}</td>
								<td>${data[3].departmentName}</td>
								<td>
									<c:choose>
									   <c:when test="${data[0].status=='Y'}">
									       <span class="label label-primary">有效</span>
									   </c:when>
									   <c:otherwise>
									       <span class="label label-danger">无效</span>
									   </c:otherwise>
									</c:choose>
								</td>
							</tr>
						</c:forEach>
					</tbody>
					<tfoot>
					<%-- 导入页码 --%>
					<jsp:include page="../../common/pages.jsp"></jsp:include>
					</tfoot>
				</table>
			</div>
		</div>
	</div>
<script>
    function gotoPage(page){
        debugger;
        //alert(selectedNodeId);
        var pageNumber = ${requestScope.pages.pageNumber};
        var currentPage = ${requestScope.pages.page};
        //首页和尾页无需跳转
        if((currentPage==1&&page==1)||(currentPage==pageNumber&&page==pageNumber)){

        } else {
            getRelateListAjax(selectedNodeId,page);
        }
    }
</script>
